import request from '@/utils/request'
import {ref} from 'vue'
export default () => {
	const myGappts=ref([])
	const storeGAppointment = async (data) => {
		await request.post(`mini/groupapt`,data)
	}
	
	const cancelGAppointment = async (id) => {
		await request.get(`mini/groupapt/${id}/cancel`)
	}
	
	const getMyGapt = async ()=>{
		myGappts.value = await  request.get("mini/groupapt/my")
	}
	
	return {
		storeGAppointment,
		cancelGAppointment,
		getMyGapt,
		myGappts
	}
}